package com.showsu.editor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author: William
 * @Description: 调用的外部接口名称枚举
 * @Date: Created in 7:52 下午 2023/11/23
 * @Modified By:
 */
@Getter
@AllArgsConstructor
public enum RemoteInterfaceEnum {

    XHS_USER_DETAIL,
    XHS_AWEME_COMMENT_LIST,
    XHS_AWEME_COMMENT_LIST_FOR_LIVE,
    XHS_AWEME_LIST,
    XHS_AWEME_LIST_WITH_XSECTOKEN,
    XHS_AWEME_DETAIL,
    XHS_AWEME_DETAIL_FOR_LIVE,
    XHS_AWEME_DETAIL_FOR_INTERACTION,
    XHS_AWEME_TAG_AND_KEYWORDS,
    XHS_SEARCH_AWEME,
    XHS_PGY_KOL_FANS_PORTRAIT,
    XHS_AWEME_VIEW_PORTRAIT,
    XHE_AWEME_CORE_DATA_INDICATORS,
    DY_USER_BASE_DETAIL,
    DY_USER_DETAIL,
    DY_AWEME_DETAIL,
    DY_AWEME_DETAIL_FOR_LIVE,
    DY_AWEME_DETAIL_DOUJIA,
    DY_AWEME_LIST,
    DY_AWEME_COMMENT_LIST,
    DY_PLAY_COUNT,
    DY_JULIANG_USER_LIST,
    DY_JULIANG_USER_FANS,
    DY_JULIANG_USER_DETAIL,
    DY_JULIANG_USER_SIMILAR,
    HANDLE_WATER,
    TIKTOK_HANDLE_WATER,
    TIKTOK_AWEME_COMMENT_LIST,
    ;

    public static RemoteInterfaceEnum getByName(String enumName) {
        if (StringUtils.isNotBlank(enumName)) {
            for (RemoteInterfaceEnum remoteInterfaceEnum : RemoteInterfaceEnum.values()) {
                if (enumName.equals(remoteInterfaceEnum.name())) {
                    return remoteInterfaceEnum;
                }
            }
        }
        return null;
    }
}
